package info.hexin.dubbo.test3.server.main;

import java.io.IOException;
import java.util.concurrent.TimeUnit;

import com.alibaba.dubbo.config.ProtocolConfig;
import info.hexin.dubbo.util.ThreadPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DubboServer {
    static Logger logger = LoggerFactory.getLogger(DubboServer.class);

    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext(new String[]{"applicationProvider.xml"});
        logger.info("xxxxxxx");
        try {
            TimeUnit.SECONDS.sleep(30);
            ProtocolConfig.destroyAll();
            ThreadPool.shutdown();
            logger.info("服务器退出>>");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
